package org.locker.device.controller.web;

import lombok.RequiredArgsConstructor;
import org.locker.common.core.domain.R;
import org.locker.service.IDeviceService;
import org.springframework.web.bind.annotation.*;

/**
 * (小程序)设备管理
 * @Description:
 * @Author: lark
 * @Date: 2023/10/8
 */
@RequiredArgsConstructor
@RestController
@RequestMapping("/app/device")
public class WebDeviceController {

    private final IDeviceService deviceService;


    /**
     * desc: 根据设备号获取设备信息和场地以及格子信息信息
     * @param deviceNo 设备号
     * @return
     */
    @GetMapping("/{deviceNo}")
    public R getDeviceInfo(@PathVariable("deviceNo")String deviceNo){
        return R.ok(deviceService.getDeviceAggregatorInfo(deviceNo));
    }


}
